<?php

namespace app\api\controller\v1\store;

use app\Request;
use app\services\BaseServices;
use app\services\store\BannerServices;

class StoreTripController
{
    protected $services;

    public function __construct(BannerServices $services)
    {
        $this->services = $services;
    }

    /**
     * @param Request $request
     * @return mixed
     * 获取首页banner
     */
    public function banner(Request $request)
    {
        $where['client'] = 3;
        $where['status'] = 1;
        $field = ['link', 'url'];
        $data = $this->services->getBannerList($where, $field);
        return app('json')->success($data);
    }
}